//
//
//import soapp
//import Eelay
//import AsyncDisplayKit
//
//
//class EeShareAlert:GesSideController,ASCollectionVConfig,ASCollectionDelegateFlowLayout{
//    
//    public var collectionNode:ASCollectionNode!
//    public var flowLayout = UICollectionViewFlowLayout()
//
//    var collectionView:UICollectionView{
//        get{
//            
//            return collectionNode.view
//        }
//    }
//    
//    func touch(cell: Any, actionID: String, model: NSMutableDictionary) {
//        
//    }
//    required public init() {
//        flowLayout = UICollectionViewFlowLayout()
//        collectionNode = ASCollectionNode(collectionViewLayout: flowLayout)
//        super.init()
//        flowLayout.minimumLineSpacing = 0
//        flowLayout.minimumInteritemSpacing = 0
//        //        let w = Swidth/2.0 - 10
//        //        flowLayout.itemSize = CGSize(width: w, height: w)
//        
//        
//    }
//    
//    required init?(coder aDecoder: NSCoder) {
//        fatalError("init(coder:) has not been implemented")
//    }
//    
//    
//    
//    
//    static var shareItems:[[String:Any]] = [
//        ["title":"微信好友","icon":"share-wx","id":SharePlatform.wx_friend.rawValue],
//        ["title":"朋友圈","icon":"share-pyq","id":SharePlatform.wx_pengyquan.rawValue],
//        ["title":"QQ好友","icon":"share-qq","id":SharePlatform.qq_friend.rawValue],
//        ["title":"微博","icon":"share-wb","id":SharePlatform.sina.rawValue],
//    ]
//    
//    let canleBt = CanleView()
//    
//    var sections:TP.section{
//        get{
//            let sec:TP.section = [
//                [
//                    ["list":EeShareAlert.shareItems]
//                ]
//            ]
//            return sec
//        }
//    }
//    
//    var selector:TP.selector = [
//        "<default>":Cell.self
//    ]
//    
//    override func viewDidLoad() {
//        canleBt.controller = self
//
//        var row = EeShareAlert.shareItems.count/4
//        if EeShareAlert.shareItems.count%4 != 0{
//            row = row + 1
//        }
//        let tabH = canleBt.bottomJust
//        self.side = .bottom(height: (row.cg_floatValue * 80.0 + 50 +  38 + tabH))
//        super.viewDidLoad()
//        configCollections(nodes: collectionNode)
//        gestureAble = false
//        
//        let titleV = UIView()
//        let titleL = UILabel()
//        _ = titleL.ui.bfont14.cl_666.center
//        titleL.text = "分享"
//        
//        let line = UIView()
//        titleV.eelay = [
//            [titleL,[ee.Y.X,[-3,0]]],
//            [line,[ee.L.B.R],"\(TP.separatorHeight)"]
//        ]
//        jo_contentView.backgroundColor = ._cellBackground
//        line.backgroundColor = UIColor._separator
//        collectionView.isScrollEnabled = false
//
//        jo_contentView.eelay = [
//            [titleV,[ee.T.L.R],"50"],
//            [canleBt,[ee.L.B.R]],
//            [collectionView,[ee.L.R],[canleBt,ee.T,ee.B],[titleL,ee.B,ee.T,10]],
//        ]
//        
//        collectionNode.load(sections: sections, selector: selector)
//        collectionNode.reloadData()
//        canleBt.bt.addTarget(self, action: #selector(close), for: .touchUpInside)
//    }
//    
////    public func collectionNode(_ collectionNode: ASCollectionNode, nodeForItemAt indexPath: IndexPath) -> ASCellNode {
////        let node = collectionNode.cellNode(indexPath: indexPath, fillModel: true, delegate: self)
////
////        return node
////    }
////
//    
//}
////extension UIImage{
////    public convenience init?(share_named:String) {
////        let bundle = Bundle(for: EeShareAlert.self)
////        self.init(named: share_named, in: bundle, compatibleWith: nil)
////    }
////}
//
//
//extension EeShareAlert{
//    class CanleView: EeBottomBar {
//        override var contentHeight: CGFloat{
//            return 38
//        }
//        let bt = UIButton()
//        override func addLayoutRules() {
//            contentView.eelay = [
//                [bt,[ee.T.L.B.R]],
//            ]
//            bt.ui.font(size: 14).ncolor(hex: "#999").ntitle(title: "取消".loc)
//        }
//    }
//    
//    class Kit:GridCol{
//        let img = ASImageNode()
//        let nameL = JoTextNode()
//        let bt = ASButtonNode()
//        override func mo_model_reload() {
//            img.image = UIImage(share_named: mo.model["icon",""])
//                nameL.attributedText = mo.model["title",""].ui.font12.cl_444.center.astring
//            bt.addTarget(self, action: #selector(share), forControlEvents: .touchUpInside)
//        }
//        
//        @objc func share() {
////            print("+++++OOOOOOD|\(controller)")
//            let ID = mo.model[int:"id",0]
//            if let plat = SharePlatform(rawValue: ID)
//            {
//                plat.share()
//            }
//            if let ctr = self.controller as? EeShareAlert{
//                ctr.close()
//            }
//        }
//        override func specGetter() -> _Spec {
//            let spec = _Spec.stack(["v|4",&-.stretch,_justfy(.center)], childs: [
//                .center(["44"], xy: .xy, child: img["44",44]),
//                nameL.Spec
//            ])
//            
//            return _Spec.over([], over: bt.Spec, back:spec)
//        }
//    }
//    
//    class Cell: JoCellNode {
//        let listV = GridBaseNode<Kit>()
//        override func mo_model_reload() {
////            print("+++____DD|\(content_controller)")
//            listV.controller = content_controller
//            listV.nodePath = "list"
//            listV.padding = .zero
//            listV.limtWidth = Swidth
//            listV.backgroundColor = .clear
//            listV.col = 4
//            listV.space = (TP.separatorHeight,TP.separatorHeight)
//            listV.mo.model = mo.model
//            co_delay(delay: 0.1) {[weak self] in
//            }
//            view.backgroundColor = .brown
//            print("++++++OSSL\(mo.model)")
//        }
//        
//        override func specGetter() -> _Spec {
//            return .stack(["v",&-.stretch], childs: [
//                listV.Spec
//            ])
//        }
//    }
//}
